Optimal. Leaf size=36 \[ -\frac {1}{2} \sqrt {2 x-x^2}+\frac {1}{2} \tanh ^{-1}\left (\sqrt {2 x-x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {699, 702, 213}
\begin {gather*} \frac {1}{2} \tanh ^{-1}\left (\sqrt {2 x-x^2}\right )-\frac {1}{2} \sqrt {2 x-x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 699
Rule 702
Rubi steps
\begin {align*} \int \frac {\sqrt {2 x-x^2}}{2-2 x} \, dx &=-\frac {1}{2} \sqrt {2 x-x^2}+\int \frac {1}{(2-2 x) \sqrt {2 x-x^2}} \, dx\\ &=-\frac {1}{2} \sqrt {2 x-x^2}-4 \text {Subst}\left (\int \frac {1}{-8+8 x^2} \, dx,x,\sqrt {2 x-x^2}\right )\\ &=-\frac {1}{2} \sqrt {2 x-x^2}+\frac {1}{2} \tanh ^{-1}\left (\sqrt {2 x-x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 49, normalized size = 1.36 \begin {gather*} \frac {1}{2} \sqrt {-((-2+x) x)} \left (-1+\frac {2 \tan ^{-1}\left (1+\sqrt {-2+x} \sqrt {x}-x\right )}{\sqrt {-2+x} \sqrt {x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.45, size = 29, normalized size = 0.81
method | result | size |
default | \(-\frac {\sqrt {-\left (x -1\right )^{2}+1}}{2}+\frac {\arctanh \left (\frac {1}{\sqrt {-\left (x -1\right )^{2}+1}}\right )}{2}\) | \(29\) |
risch | \(\frac {x \left (x -2\right )}{2 \sqrt {-x \left (x -2\right )}}+\frac {\arctanh \left (\frac {1}{\sqrt {-\left (x -1\right )^{2}+1}}\right )}{2}\) | \(30\) |
trager | \(-\frac {\sqrt {-x^{2}+2 x}}{2}-\frac {\ln \left (\frac {\sqrt {-x^{2}+2 x}-1}{x -1}\right )}{2}\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 45, normalized size = 1.25 \begin {gather*} -\frac {1}{2} \, \sqrt {-x^{2} + 2 \, x} + \frac {1}{2} \, \log \left (\frac {2 \, \sqrt {-x^{2} + 2 \, x}}{{\left | x - 1 \right |}} + \frac {2}{{\left | x - 1 \right |}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 57 vs.
\(2 (28) = 56\).
time = 1.11, size = 57, normalized size = 1.58 \begin {gather*} -\frac {1}{2} \, \sqrt {-x^{2} + 2 \, x} + \frac {1}{2} \, \log \left (\frac {x + \sqrt {-x^{2} + 2 \, x}}{x}\right ) - \frac {1}{2} \, \log \left (-\frac {x - \sqrt {-x^{2} + 2 \, x}}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\sqrt {- x^{2} + 2 x}}{x - 1}\, dx}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.49, size = 40, normalized size = 1.11 \begin {gather*} -\frac {1}{2} \, \sqrt {-x^{2} + 2 \, x} - \frac {1}{2} \, \log \left (-\frac {2 \, {\left (\sqrt {-x^{2} + 2 \, x} - 1\right )}}{{\left | -2 \, x + 2 \right |}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} -\int \frac {\sqrt {2\,x-x^2}}{2\,x-2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________